package com.mh.common;


import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class BaseControllerAdvice {
    @ExceptionHandler(value = JwtAuthorizationException.class)
    public Result jwtExceptionHandle(JwtAuthorizationException e){
        e.printStackTrace();
        return Result.fail(e.getMessage());
    }
    @ExceptionHandler(value = Exception.class)
    public Result exceptionHandle(Exception e){
        e.printStackTrace();
        return Result.fail(e.getMessage());
    }
}
